//////////////////////////////////////
// Fast Container Library           //
// MIT License - Copyright (c) 2012 //
//////////////////////////////////////

#pragma once

#include "common.h"

FC_NAMESPACE_BEGIN


// aligned_buffer: simple replacement for aligned_storage.

template <size_t N, size_t Alignment> struct aligned_buffer { char data[N]; };
template <size_t N> struct aligned_buffer<N, 2> { FC_ALIGN(char, data[N], 2); };
template <size_t N> struct aligned_buffer<N, 4> { FC_ALIGN(char, data[N], 4); };
template <size_t N> struct aligned_buffer<N, 8> { FC_ALIGN(char, data[N], 8); };
template <size_t N> struct aligned_buffer<N, 16> { FC_ALIGN(char, data[N], 16); };
template <size_t N> struct aligned_buffer<N, 32> { FC_ALIGN(char, data[N], 32); };
template <size_t N> struct aligned_buffer<N, 64> { FC_ALIGN(char, data[N], 64); };
template <size_t N> struct aligned_buffer<N, 128> { FC_ALIGN(char, data[N], 128); };


// uninitialized_construct
//
// This class is used by some containers and classes as a non-default
// constructor optimization where appropriate. The purpose of this class
// is to allow us a way to construct an object with a more specialized set
// of parameters, such as temporary allocation flags, bypassing normal
// member initialization behaviors, and so forth. The end result of this
// optimization is faster code, less code-generation bloat, and smaller
// compiled code.

struct uninitialized_construct {};


FC_NAMESPACE_END
